package ru.niir.goodfil.ui.utils;

import ru.niir.goodfil.audit.util.Assert;
import ru.niir.goodfil.audit.util.EntityUtils;
import ru.niir.goodfil.audit.util.PropertyHistory;
import ru.niir.goodfil.db.GoodfilFactory;
import ru.niir.goodfil.db.Order;
import ru.niir.goodfil.db.handlers.Goodfil;

import java.util.List;

public class TestEntityComparetor {
    public static void main(String[] args) {
        Goodfil gf = GoodfilFactory.getInstance();
        Order o1 = gf.getOrderById(6100);
        Order o2 = gf.getOrderById(6102);
        Assert.notNull(o1);
        Assert.notNull(o2);

        List<PropertyHistory> result = EntityUtils.compareEntities(o1, o2);
        for (PropertyHistory propertyHistory : result) {
            System.out.println(propertyHistory.toString());
        }
    }
}
